﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="DancersDB.ascx.cs" Inherits="portfolio.Views.DancersDB" %>
<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

<div id="dancersDB" class="container">
    <telerik:RadButton ID="btnHelp" runat="server" Text="Help" CssClass="dancersDBButton" OnClick="btnHelp_Click" />
    <telerik:RadButton ID="btnLogin" runat="server" Text="Login" CssClass="dancersDBButton" OnClick="btnLogin_Click" />
    <telerik:RadButton ID="btnUserAdminSwitch" runat="server" ToggleType="CustomToggle" ButtonType="StandardButton" 
        OnClick="btnUserAdminSwitch_Click" CssClass="dancersDBButton" Visible="false">
        <ToggleStates>
            <telerik:RadButtonToggleState Text="Switch to Admin Screen" Value="playlist" />
            <telerik:RadButtonToggleState Text="Switch to Playlist" Value="admin" />
        </ToggleStates>
    </telerik:RadButton>

    <asp:Panel runat="server" ID="DancersDBContent"></asp:Panel>
    <telerik:RadAjaxLoadingPanel runat="server" ID="DancersDBContentLoadingPanel" IsSticky="true" CssClass="ajaxLoader" />

    <telerik:RadAjaxPanel runat="server" ID="rapLoginPanel" LoadingPanelID="DancersDBContentLoadingPanel">
        <telerik:RadWindow ID="rwLogin" runat="server" Width="250px" Height="140px" Modal="true">
            <ContentTemplate>
                <asp:Panel runat="server" DefaultButton="btnCheckLogin">
                    <asp:TextBox ID="txtUserName" runat="server" CssClass="dancersDBLoginControls" />
                    <asp:Label ID="lblUserName" runat="server" AssociatedControlID="txtUserName" Text="User Name:" CssClass="dancersDBLoginControls" />
                    <br />
                    <asp:TextBox ID="txtPassword" runat="server" TextMode="Password" CssClass="dancersDBLoginControls" />
                    <asp:Label ID="lblPassword" runat="server" AssociatedControlID="txtPassword" Text="Password:" CssClass="dancersDBLoginControls" />
                    <br />
                    <br />
                    <asp:Button ID="btnCheckLogin" runat="server" Text="Login" OnClick="btnCheckLogin_Click" CssClass="dancersDBLoginControls" />
                </asp:Panel>
                <br />
            </ContentTemplate>
        </telerik:RadWindow>
        <telerik:RadWindow runat="server" ID="rwHelp" Width="600px" Height="380px" Modal="true">
            <ContentTemplate>
                <p>
                    The Dancers' Database app contains two screens; the playlist screen and the administrative screen, which requires a login.
                </p>
                <ul>
                    <li>The Playlist Screen is composed of two grids; the Library on top, and the Playlist on bottom. There is a movable bar between them 
                        that will let you make one more visible than the other. the two buttons in the center of the scrollbar will let you fill the screen 
                        with one of the two grids.
                        <ul>
                            <li>To filter songs by Dance click on the dropdown box, select the songs you want to see dances for, and click Refresh. To reshow 
                                the full listings click Refresh when no dances are select or select the Show All Dances option and click Refresh.
                            </li>
                            <li>To sort by a column click on the column's header.
                            </li>
                            <li>To add a song to the playlist click on the green check button on the left of the library.
                            </li>
                            <li>To remove a song from the playlist click the red X button.
                            </li>
                            <li>To export the playlist to MS Word click on the W icon above the libray.
                            </li>
                        </ul>
                    </li>
                    <li>The Admin Screen allows administrators to insert, delete, update, and remove songs from the Dancers' Database.
                        <ul>
                            <li>After logging in, click on the Switch to Admin button to switch to the Admin Screen.
                            </li>
                            <li>Click on the Switch to Playlist button to switch to the Playlist Screen
                            </li>
                            <li>To filter songs by Dance click on the dropdown box, select the songs you want to see dances for, and click Refresh. To reshow 
                                the full listings click Refresh when no dances are select or select the "Show All Dances" option and click Refresh.
                            </li>
                            <li>To add a new song to the database click the Add New Record button at the top of the grid, insert the song's details, 
                                and click the green check mark.
                            </li>
                            <li>To update details for an existing song click on the Pencil button to the left of the desired song, update the details 
                                of the song, and click the green check button.
                            </li>
                            <li>To cancel an update request click the red X button after pressing the Pencil button. Any changes made will be lost.
                            </li>
                            <li>To delete a song from the Dancers' Database click the red X button and then press the Ok button on the confirmation box.
                            </li>
                        </ul>
                    </li>
                </ul>
            </ContentTemplate>
        </telerik:RadWindow>
    </telerik:RadAjaxPanel>
    <telerik:RadWindowManager ID="rwmLoginError" runat="server" EnableShadow="true">
    </telerik:RadWindowManager>
</div>
